package com.github.shiqiyue.app.modules.dbms.rowmapper;

import com.github.shiqiyue.app.api.sapi.controller.dbms.dto.TableInfoDTO;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/***
 * 表信息RowMapper
 * @author wenyao.wu
 * @date 2019/1/30
 */
public class TableInfoRowMapper implements RowMapper<TableInfoDTO> {

    @Override
    public TableInfoDTO mapRow(ResultSet rs, int rowNum) throws SQLException {
        String tableName = rs.getString(1);
        String remark = rs.getString(2);
        TableInfoDTO tableInfo = new TableInfoDTO();
        tableInfo.setTableName(tableName);
        return tableInfo;
    }

}